﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using EasySite.Web.Security;

namespace EasySite.Web.Controllers
{
    [Authorize(Roles = Roles.Admin)]
    public class PageCategoryController : ControllerBase
    {
        //
        // GET: /PageCategory/

        public ActionResult Index()
        {
            return View();
        }

        public JsonResult List()
        {
            var categories = EasySiteContext.Current.PageCategoryCache.PageCategories;
            return Json(categories, JsonRequestBehavior.AllowGet);
        }

    }
}
